import { httpDelete, httpGet, httpPost, httpPut } from "@/utils/http"

// 查询居民数据
export const findResidentInfoApi = (data) => {
    return httpPost('/residents/search', data)
}
// 添加居民数据
export const addResidentApi = (data) => {
    return httpPost('/residents/add', data)
}
// 添加居民关系
export const addResidentRelationApi = (data) => {
    return httpPost('/relations/add', data)
}
// 查询居民关系
export const findResidentRelationApi = (data) => {
    return httpPost('/relations/search', data)
}


// 获取一个居民详情
export const getREsidentDetailApi = (data) => {
    return httpGet('/residents/detail', data)
}
// 修改居民
export const upDateREsidentApi = (data) => {
    return httpPut('/residents/update', data)
}
// 修改居民信息和头像
export const updateResidentDetailApi = (data) => {
    return httpPost('/residents/updateAvatar', data)
}
// 获取一个居民详情
export const deleteREsidentApi = (data) => {
    return httpDelete('/residents/remove', data)
}